package com.training.content.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.training.content.mapper.SysZhAddressMapper;
import com.training.content.domain.SysZhAddress;
import com.training.content.service.ISysZhAddressService;

/**
 * 区域Service业务层处理
 * 
 * @author training
 * @date 2021-10-25
 */
@Service
public class SysZhAddressServiceImpl implements ISysZhAddressService 
{
    @Autowired
    private SysZhAddressMapper sysZhAddressMapper;

    /**
     * 查询区域
     * 
     * @param areaId 区域主键
     * @return 区域
     */
    @Override
    public SysZhAddress selectSysZhAddressByAreaId(Long areaId)
    {
        return sysZhAddressMapper.selectSysZhAddressByAreaId(areaId);
    }

    /**
     * 查询区域列表
     * 
     * @param sysZhAddress 区域
     * @return 区域
     */
    @Override
    public List<SysZhAddress> selectSysZhAddressList(SysZhAddress sysZhAddress)
    {
        return sysZhAddressMapper.selectSysZhAddressList(sysZhAddress);
    }

    /**
     * 新增区域
     * 
     * @param sysZhAddress 区域
     * @return 结果
     */
    @Override
    public int insertSysZhAddress(SysZhAddress sysZhAddress)
    {
        return sysZhAddressMapper.insertSysZhAddress(sysZhAddress);
    }

    /**
     * 修改区域
     * 
     * @param sysZhAddress 区域
     * @return 结果
     */
    @Override
    public int updateSysZhAddress(SysZhAddress sysZhAddress)
    {
        return sysZhAddressMapper.updateSysZhAddress(sysZhAddress);
    }

    /**
     * 批量删除区域
     * 
     * @param areaIds 需要删除的区域主键
     * @return 结果
     */
    @Override
    public int deleteSysZhAddressByAreaIds(Long[] areaIds)
    {
        return sysZhAddressMapper.deleteSysZhAddressByAreaIds(areaIds);
    }

    /**
     * 删除区域信息
     * 
     * @param areaId 区域主键
     * @return 结果
     */
    @Override
    public int deleteSysZhAddressByAreaId(Long areaId)
    {
        return sysZhAddressMapper.deleteSysZhAddressByAreaId(areaId);
    }
}
